package com.ruoyi.stream.framework.model.configBuilder.single;

import com.ruoyi.stream.framework.core.workDomain.io.ConsumeIO;
import com.ruoyi.stream.framework.core.workDomain.io.IOBehavior;
import com.ruoyi.stream.framework.model.configBuilder.IOTaskConfigBuilder;
import io.netty.channel.Channel;

import java.io.InputStream;

public class SingleIOTaskConfigBuilder extends IOTaskConfigBuilder<SingleIOTaskConfig> {

    private SingleIOTaskConfig config;

    @Override
    public SingleIOTaskConfig build() {
        return this.config;
    }

    public void setConsumeIO(ConsumeIO consumeIO) {
        config.setConsumeIO(consumeIO);
    }

    public void setReadCacheLength(int readCacheLength) {
        config.setReadCacheLength(readCacheLength);
    }

    public void setProductBehavior(IOBehavior productBehavior) {
        config.setProductBehavior(productBehavior);
    }

    public void setCancelBehavior(IOBehavior cancelBehavior) {
        config.setCancelBehavior(cancelBehavior);
    }

    public void setPauseBehavior(IOBehavior pauseBehavior) {
        config.setPauseBehavior(pauseBehavior);
    }

    public void setFullLength(int fullLength) {
        config.setFullLength(fullLength);
    }

    public void setSkipLength(int skipLength) {
        config.setSkipLength(skipLength);
    }

    public void setInputStream(InputStream inputStream) {
        config.setInputStream(inputStream);
    }

    public void setOutputChannel(Channel outputChannel) {
        config.setOutputChannel(outputChannel);
    }
}
